<?php
 
	$mydbEngine = $configValues['CONFIG_DB_ENGINE'];
	$mydbUser = $configValues['CONFIG_DB_USER'];
	$mydbPass = $configValues['CONFIG_DB_PASS'];
	$mydbHost = $configValues['CONFIG_DB_HOST'];
	$mydbName = $configValues['CONFIG_DB_NAME'];
	$mydbPort = '3306';
		
	$dbConnectString = $mydbEngine . "://".$mydbUser.":".$mydbPass."@".
				$mydbHost.":".$mydbPort."/".$mydbName;


	// we introduced support for php's database abstraction layer which simplifies database connections
	// to different technologies like mysql, oracle, postgresql, etc...
	// until everything is completely migrated we will leave these commented out

	include_once ('DB.php');

	$dbSocket = DB::connect($dbConnectString);

	if (DB::isError ($dbSocket))
		die ("<b>Database connection error</b><br/>
			<b>Error Message</b>: " . $dbSocket->getMessage () . "<br/>" 
			);

	
	include_once (dirname(__FILE__).'/errorHandling.php');		// we declare the errorHandler() function in errorHandling.php

	$dbSocket->setErrorHandling(PEAR_ERROR_CALLBACK, 'errorHandler');	// setting errorHandler function for the dbSocket obj

